package cn.wolfcode.trip.base.service;

import cn.wolfcode.trip.base.domain.Travel;
import cn.wolfcode.trip.base.domain.User;
import cn.wolfcode.trip.base.query.QueryObject;
import cn.wolfcode.trip.base.query.UserFansQuery;
import com.github.pagehelper.PageInfo;

import java.util.List;

import java.util.HashMap;

public interface IUserService {
    //根据业务来定义我们需要的方法

    //首先我们需要做的是注册的功能,要查询数据库中有没有重复的邮箱才能注册

    void saveOrCheckEmail(User user);

    User login(String email, String password);

    PageInfo<?> query(QueryObject qo);

    void update(User user);

    User getUserByAuthorId(Long authorId);

    void updateFans(User user);

    void deleteFans(Long id);

    //查询积分
    User selectIntegralById(Long id);

    void saveLike(Travel travel);

    HashMap queryLike(Long id);

    void deleteLike(Long travelId);

    HashMap queryFans(Long id);

    List<User> listAllFansOrFollow(UserFansQuery qo);

    //查询用户
    List<User> selectAll();
}
